<template>
	<view>
		<!-- 居中弹出 -->
		<gui-popup ref="guipopup1">
			<view class="gui-relative">
				<view class="tool-box">
					<view class="box bgfff radius10 mt22">
						<text class="title bold f38 c333">{{fullName}}</text>
						<view class="list flex-ac-wrap">
							<view class="item flex-dc-ac mt22" v-for="(childItem,childIndex) in dataList"
								:key="childItem.id">
								<text class="item-icon cfff f56" :class="childItem.icon"
									:style="{'background':childItem.iconBackground||'#008cff'}"></text>
								<text class="item-text c333 f26">{{childItem.fullName}}</text>
							</view>
						</view>
					</view>
				</view>
				<!-- 关闭按钮 -->
				<text class="gui-block-text demo-close gui-icons gui-color-white gui-absolute-rt"
					@tap.stop="close">&#xe78a;</text>
			</view>
		</gui-popup>
	</view>
</template>

<script>
	export default {
		name: "Home-menu",
		props: {
			dataList: {
				typeof: Array,
				default: () => {
					return []
				}
			},
			fullName: {
				typeof: String,
				default: ''
			}
		},
		data() {
			return {
				menuList: [], //菜单
			};
		},
		methods: {
			//01 居中弹出
			open: function() {
				this.$refs.guipopup1.open();
			},
			close: function() {
				this.$refs.guipopup1.close();
			},
			menuClick() {
				console.log("=====点击了");
			}
		}
	}
</script>

<style lang="scss">
	.tool-box {
		.box {
			padding: 20rpx 0;

			.title {
				padding-left: 30rpx;
			}

			.list {
				padding: 0 10rpx;
				display: flex;
				justify-content: center;

				.item {
					width: 170rpx;

					.item-icon {
						width: 88rpx;
						height: 88rpx;
						margin-bottom: 8rpx;
						line-height: 88rpx;
						text-align: center;
						border-radius: 20rpx;
					}
				}
			}
		}
	}
</style>